package cn.lg.soar.system.config;

import cn.lg.soar.database.datascope.DataScopeHolder;
import cn.lg.soar.system.account.controller.*;
import cn.lg.soar.system.account.service.impl.*;
import cn.lg.soar.system.auth.client.*;
import cn.lg.soar.system.auth.controller.*;
import cn.lg.soar.system.auth.mapper.*;
import cn.lg.soar.system.auth.service.*;
import cn.lg.soar.system.auth.service.impl.*;
import cn.lg.soar.system.general.client.*;
import cn.lg.soar.system.general.config.GeneralProperties;
import cn.lg.soar.system.general.controller.*;
import cn.lg.soar.system.general.mapper.DataSourceMapper;
import cn.lg.soar.system.general.mapper.UserConfigGroupMapper;
import cn.lg.soar.system.general.mapper.UserConfigMapper;
import cn.lg.soar.system.general.service.UserTagItemService;
import cn.lg.soar.system.general.service.impl.*;
import cn.lg.soar.system.handler.AccountBindTypeTranslateHandler;
import cn.lg.soar.system.handler.UserStatusTranslateHandler;
import cn.lg.soar.system.handler.UserTypeTranslateHandler;
import cn.lg.soar.system.monitor.client.LogConfigApiClient;
import cn.lg.soar.system.monitor.client.OperationLogApiClient;
import cn.lg.soar.system.monitor.client.RefreshTokenApiClient;
import cn.lg.soar.system.monitor.controller.*;
import cn.lg.soar.system.monitor.service.impl.LogConfigServiceImpl;
import cn.lg.soar.system.monitor.service.impl.OperationLogServiceImpl;
import cn.lg.soar.system.monitor.service.impl.RefreshTokenServiceImpl;
import cn.lg.soar.system.tenant.client.TenantApiClient;
import cn.lg.soar.system.tenant.controller.TenantController;
import cn.lg.soar.system.tenant.service.impl.TenantServiceImpl;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;

/**
 * @author luguoxiang 469599794@qq.com
 * @Date: 2024/2/23 16:30
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@ImportAutoConfiguration({
        // 其他
        LoginProps.class,
        SsoClientProps.class,
        SsoServerProps.class,
        GeneralProperties.class,
        SystemSwaggerConfigurer.class,
        UserStatusTranslateHandler.class,
        AccountBindTypeTranslateHandler.class,
        UserTypeTranslateHandler.class,
        // client
        MenuApiClient.class,
        OrgApiClient.class,
        PermitApiClient.class,
        PostApiClient.class,
        RefreshTokenApiClient.class,
        RoleApiClient.class,
        TenantApiClient.class,
        TokenCurrBindApiClient.class,
        UserApiClient.class,
        UserCurrBindApiClient.class,
        LogConfigApiClient.class,
        OperationLogApiClient.class,
        CaptchaApiClient.class,
        SysConfigApiClient.class,
        DictApiClient.class,
        RsaKeyApiClient.class,
        SysConfigApiClient.class,
        UserConfigApiClient.class,
        DataPermissionApiClient.class,
        // service
        MenuPermitService.class,
        OrgRoleService.class,
        PostRoleService.class,
        RoleMenuService.class,
        UserOrgService.class,
        UserRoleService.class,
        AccountBindServiceImpl.class,
        DataRuleItemServiceImpl.class,
        DataRuleServiceImpl.class,
        DataRuleProvideServiceImpl.class,
        DataScopeServiceImpl.class,
        DataSourceServiceImpl.class,
        MenuServiceImpl.class,
        OrgServiceImpl.class,
        PermitServiceImpl.class,
        PostServiceImpl.class,
        RefreshTokenServiceImpl.class,
        ResourceServiceImpl.class,
        RoleServiceImpl.class,
        SsoApplyServiceImpl.class,
        TemporaryPasswordServiceImpl.class,
        TenantServiceImpl.class,
        TokenCurrBindServiceImpl.class,
        UserCurrBindServiceImpl.class,
        UserServiceImpl.class,
        AccountServiceImpl.class,
        CodeLoginServiceImpl.class,
        LoginServiceImpl.class,
        SsoClientServiceImpl.class,
        SsoServerServiceImpl.class,
        LogConfigServiceImpl.class,
        OperationLogServiceImpl.class,
        DictItemServiceImpl.class,
        DictServiceImpl.class,
        PublicServiceImpl.class,
        UserConfigGroupServiceImpl.class,
        SysConfigServiceImpl.class,
        UserConfigServiceImpl.class,
        UserTagServiceImpl.class,
        UserTagItemService.class,
        OrgSelectorService.class,
        PostSelectorService.class,
        UserSelectorService.class,

        // controller
        AccountBindController.class,
        DataRuleController.class,
        DataScopeController.class,
        DataSourceController.class,
        MenuController.class,
        OrgController.class,
        PermitController.class,
        PostController.class,
        ResourceController.class,
        RoleController.class,
        SsoApplyController.class,
        TemporaryPasswordController.class,
        TenantController.class,
        TokenInfoController.class,
        UserController.class,
        AccountController.class,
        CodeLoginController.class,
        LoginController.class,
        SsoClientController.class,
        SsoServerController.class,
        LogConfigController.class,
        OperationLogController.class,
        ServerController.class,
        WebLogController.class,
        DictController.class,
        DictItemController.class,
        PublicController.class,
        UserConfigGroupController.class,
        SysConfigController.class,
        UserConfigController.class,
        DataRuleItemController.class,
        DataRuleProvideController.class,
        UserTagController.class,
        OrgSelectorController.class,
        PostSelectorController.class,
        UserSelectorController.class,
})
public class AutoConfiguration {

    static {
        // 数据权限忽略
        DataScopeHolder.addIgnore(AccountBindMapper.class);
        DataScopeHolder.addIgnore(DataRuleItemMapper.class);
        DataScopeHolder.addIgnore(DataRuleMapper.class);
        DataScopeHolder.addIgnore(DataRuleProvideMapper.class);
        DataScopeHolder.addIgnore(DataScopeMapper.class);
        DataScopeHolder.addIgnore(DataSourceMapper.class);
        DataScopeHolder.addIgnore(ResourceMapper.class);
        DataScopeHolder.addIgnore(TemporaryPasswordMapper.class);
        DataScopeHolder.addIgnore(TokenCurrBindMapper.class);
        DataScopeHolder.addIgnore(UserCurrBindMapper.class);
        DataScopeHolder.addIgnore(UserConfigMapper.class);
        DataScopeHolder.addIgnore(UserConfigGroupMapper.class);
    }

}
